<template>
  <div>
    <el-form ref="form" :model="form" :disabled="true" label-width="80px">
                      <el-form-item label="关联产品" prop="pid">
                        <el-input v-model="form.pid" placeholder="请输入关联产品" />
                      </el-form-item>
                      <el-form-item label="适配OS" prop="paOs">
                        <el-select v-model="form.paOs" placeholder="请选择适配OS">
                          <el-option
                              v-for="dict in dict.type.audition_os"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="适配时间" prop="paTime">
                        <el-date-picker clearable
                                        v-model="form.paTime"
                                        type="date"
                                        value-format="yyyy-MM-dd"
                                        placeholder="请选择适配时间">
                        </el-date-picker>
                      </el-form-item>
                      <el-form-item label="适配OS类型" prop="paType">
                        <el-select v-model="form.paType" placeholder="请选择适配OS类型">
                          <el-option
                              v-for="dict in dict.type.auditiing_os_type"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="适配状态" prop="paState">
                        <el-select v-model="form.paState" placeholder="请选择适配状态">
                          <el-option
                              v-for="dict in dict.type.auditing_status"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="适配OS版本" prop="paVersion">
                        <el-input v-model="form.paVersion" placeholder="请输入适配OS版本" />
                      </el-form-item>
                      <el-form-item label="兼容等级" prop="paLevel">
                        <el-select v-model="form.paLevel" placeholder="请选择兼容等级">
                          <el-option
                              v-for="dict in dict.type.compatibility_level"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="OS小版本" prop="paMinVersion">
                        <el-input v-model="form.paMinVersion" placeholder="请输入OS小版本" />
                      </el-form-item>
                      <el-form-item label="认证状态" prop="paAuthenticationStatus">
                        <el-select v-model="form.paAuthenticationStatus" placeholder="请选择认证状态">
                          <el-option
                              v-for="dict in dict.type.certification_status"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="适配平台" prop="paPlatform">
                        <el-select v-model="form.paPlatform" placeholder="请选择适配平台">
                          <el-option
                              v-for="dict in dict.type.adaptation_platform"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="收费/免费" prop="paCost">
                        <el-input v-model="form.paCost" placeholder="请输入收费/免费" />
                      </el-form-item>
                      <el-form-item label="适配CPU型号" prop="paCpu">
                        <el-select v-model="form.paCpu" placeholder="请选择适配CPU型号">
                          <el-option
                              v-for="dict in dict.type.adapted_cpu_model"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="上架情况" prop="paListing">
                        <el-select v-model="form.paListing" placeholder="请选择上架情况">
                          <el-option
                              v-for="dict in dict.type.auditing_listing"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="备注" prop="paRemark">
                        <el-input v-model="form.paRemark" type="textarea" placeholder="请输入内容" />
                      </el-form-item>
                      <el-form-item label="适配验证情况" prop="paValidate">
                        <el-select v-model="form.paValidate" placeholder="请选择适配验证情况">
                          <el-option
                              v-for="dict in dict.type.adaptation_verification_status"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="安装使用文档" prop="paUsingDocuments">
                        <file-upload v-model="form.paUsingDocuments"/>
                      </el-form-item>
                      <el-form-item label="适配产品安装包" prop="paInstallPackage">
                        <file-upload v-model="form.paInstallPackage"/>
                      </el-form-item>
                      <el-form-item label="删除标志" prop="delFlag">
                        <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
                      </el-form-item>
                      <el-form-item label="备注" prop="remark">
                        <el-input v-model="form.remark" placeholder="请输入备注" />
                      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
    </div>
  </div>
</template>

<script>
import EditMixin from "@/minixs/edit"
import request from "@/utils/request";
export default {
  name: "detail",
  mixins:[EditMixin],
      dicts: ['audition_os', 'adapted_cpu_model', 'compatibility_level', 'adaptation_verification_status', 'adaptation_platform', 'auditing_status', 'auditiing_os_type', 'auditing_listing', 'certification_status'],
  data() {
    return {
      // 表单数据
      form: {
        id: null,
        climecode: null,
        climename: null,
        pcode: null,
        delFlag: null,
        createBy: null,
        updateBy: null,
        createTime: null,
        updateTime: null,
        remark: null
      },
    }
  },
  mounted() {
    request({
      url: '/info/adaptation' + this.id,
      method: 'get'
    }).then(res=>{
      this.form = res.data;
    })
  },
};
</script>
